<?php
// Iniciamos sesión
session_start();
// Incluímos variables y funciones de login
include "vars.php";
require 'helpers/login.php';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Álbum de Fotos</title>
        <!-- Codificación UTF8 -->
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" media="screen, print, projection, tv, handheld"
              href="styles/album.css">
        <link rel="stylesheet" media="screen, print, projection, tv, handheld"
              href="styles/photo.css">
    </head>
    <body>
        <?php require 'helpers/photo.php' ?>

        <!-- Cabecera de la web -->
        <?php require 'views/layout/header.php' ?>

        <!-- Contenido principal de la web -->
        <div id="main">
            <?php foreach($photos as $photo_id => $photo) { ?>
            <div class="photo-float">
                <a href="photo.php?id=<?php echo $photo_id ?>">
                    <?php echo thumbnail_photo_tag($photo) ?>
                </a>
            </div>
            <?php } ?>
            <div class="clear"></div>
        </div>

        <?php require 'views/layout/footer.php' ?>
    </body>
</html>